# coding=utf-8

class Staff(object):
    headers = ['name', 'number', 'in_date', 'branch', 'position']
    staff_list = [
        ['刘斌', '23253', '2021/12/27', '云BG', 'python开发工程师'],
        ['何文娜', '35524', '2020/18/25', '安全BG', 'python开发工程师'],
        ['曲旭', '35542', '2021/1/8', '安全BG', 'python开发工程师'],
        ['刘淑珍', 'w15635', '2021/2/4', '国际市场体系', '市场专员'],
        ['孙可新', 'w25365', '2021/4/20', '安全BG', 'python开发工程师'],
        ['阚毅', '21125', '2019/7/20', '国际市场体系', '市场专员'],
        ['刘嘉欣', '32588', '2019/1/15', '安全BG', '测试工程师'],
        ['王金磊', '36423', '2019/11/29', '国际市场体系', '市场专员'],
        ['吕艳汝', '89742', '2019/9/15', '安全BG', 'go开发工程师'],
        ['刘新新', '35654', '2021/1/12', '国际市场体系', '市场专员'],
        ['王金磊', '12544', '2022/1/10', '云BG', 'go开发工程师'],
    ]


class Sort(object):
    u"""排序相关"""
    SORT = 'sort'

    # 排序方式
    ASC = 'asc'
    DESC = 'desc'


class LenFun(object):
    # 传入的参数长度对应的功能
    ALL = 1
    FILTER_SORT = 2
    FILTER_OR_SORT = 1
    FILTER_AND_SORT = 2


class Filter(object):
    # 支持的过滤字段类型
    fields = ['name', 'number', 'date', 'branch', 'position']

    # 支持的查询字段类型
    NAME = 'name'
    NUM = 'num'

    # 支持的修改字段类型
    DATE = 'date'
    BRANCH = 'branch'
    POSITION = 'position'

    # 打印所有员工信息类型
    ALL = 'all'


class Message(object):
    u"""帮助信息相关"""
    HELP_MSG = """
Help:
    add   Adds an employee
    del   Delete an employee
    mod   Modify an employee
    get   Gets an employee
    list  List all employee
    help  Show help message
    exit  Exit the system
"""

    HELP_ADD = """
Help:
    Action:    ADD
    Usage:     add name number date branch position
    Example:   add 孙昊 15028 2021/8/30 云BG Python开发工程师
    """

    HELP_DEL = """
Help:
    Action:    DEL
    Usage:     del number
    Example:   del 21125
    """

    HELP_MOD = """
Help:
    Action:    MOD
    Usage:     MOD number field_type new_field
    Example1:  mod 21125 position 测试工程师
    Example2:  mod 35654 date 2022/1/10
    """

    HELP_GET = """
Help:
    Action:    GET
    Usage:     get number
    Example:   get w25365
    """

    HELP_LIST = """
Help:
    Action:    LIST
    Usage_1:   list field_type:field
    Usage_2:   list sort:field_type (default asc)
    Usage_3:   list sort:field_type:field
    Usage_4:   list field_type:field,sort:field_type

    Example1:  list position:python开发工程师
    Example2:  list sort:number
    Example3:  list sort:number:desc
    Example4:  list branch:云BG,sort:name
    """